<%@page import="com.alibaba.fastjson.JSONObject"%>
<%@page import="com.dingpeikeji.quickdeer.core.common.utils.IdGen"%>
<%@page import="com.dingpeikeji.quickdeer.modules.base.web.FSysController"%>
<%@page import="com.dingpeikeji.quickdeer.core.common.utils.CookieUtils"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
	<%
	String token = IdGen.uuid();
	session.setAttribute("token", token);
	%>
<link href="${ctxStatic }/index/login/css/login.css" rel="stylesheet">
<link href="${ctxStatic }/index/home/css/style.css" rel="stylesheet">
<link href="${ctxStatic }/index/css/header.css" rel="stylesheet">
<script src="${ctxStatic }/jquery/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
	$(function(){
		$('#backUrl').val(window.location.href);
		$("#sub").click(function(){
			$('#loginForm').submit();
		})
		var keyVal2= "${sessionScope.mes}";
		if(keyVal2.length!=0){  
			$("#mes").html("<font color='red' size='3'>"+keyVal2+"</font>");
		}  
	})
</script>
<script>
	//第一种方法
	$(document)
			.ready(
					function() {
						var doc = document, inputs = doc
								.getElementsByTagName('input'), supportPlaceholder = 'placeholder' in doc
								.createElement('input'), placeholder = function(
								input) {
							var text = input.getAttribute('placeholder'), defaultValue = input.defaultValue;
							if (defaultValue == '') {
								input.value = text
							}
							input.onfocus = function() {
								if (input.value === text) {
									this.value = ''
								}
							};
							input.onblur = function() {
								if (input.value === '') {
									this.value = text
								}
							}
						};
						if (!supportPlaceholder) {
							for (var i = 0, len = inputs.length; i < len; i++) {
								var input = inputs[i], text = input
										.getAttribute('placeholder');
								if (input.type === 'text' && text) {
									placeholder(input)
								}
							}
						}
					});
	document.onkeydown = function (e) {  
	    if (!e) e = window.event;  
	    if ((e.keyCode || e.which) == 13) {  
	        var obtnLogin = document.getElementById("sub");   //submit_btn为按钮ID  
	        obtnLogin.focus();  
	    }  
	}
</script>
</head>
<%session.removeAttribute("mes");%>
<body>
	<div class="head">
		<div class="login_1"><a href="${ctxFront }/index">
            <img class="img-1" src="${ctxStatic }/index/images/logo.png"></a>
		<img class="phone" src="${ctxStatic }/index/images/phone.png">
		</div>
		<div class="d_login_0">
			<div class="d_login">
				<img class="d_login_1" src="${ctxStatic }/index/images/load-banner.png">
				<div class="d_login_2">
					<span class="vip">会员登录</span>
					<div class="d_login_3">
					<form id="loginForm" action="${ctxFront}/login" method="post">
					<input id="backUrl" type="hidden" name="backUrl" /> 
						<dl>
							<dd>
								<img src="${ctxStatic }/index/images/load-number.png"> 
								<input class="d_login_4" type="text" placeholder="请输入账号" name="username">
							</dd>
							<dd>
								<img src="${ctxStatic }/index/images/load-password.png">
								 <input class="d_login_4" type="password" placeholder="请输入密码" name="password" >
							</dd>
						</dl>
						<label>&nbsp;
						<input class="d_login_5" name="saveUserFor3Months" type="checkbox" value="yes">&nbsp;30天自动登录
						</label>
						 <a class="d_pass" href="${pageContext.request.contextPath }/password.jsp">忘记密码?</a>
						 <input type="button" class="d_login_6" value="登录" id="sub">
						</form>
						<span id="mes"></span> <dl>
							<dd>
								<p class="d_login_7">您还没有霞客约车账号，</p>
								<a class="d_login_8" href="${pageContext.request.contextPath }/register.jsp">请注册</a>
								<br><font  color="red" size="3">${message }</font>
							</dd>
							<dd>
								<p class="d_login_9">第三方登录：</p>
								<a href="${ctxFront }/info/qqlogin" >
								<img class="d_login_10" src="${ctxStatic }/index/images/qq.png" ></a>
								<a href="${ctxFront }/info/wxlogin">
								<img class="d_login_11" src="${ctxStatic }/index/images/weixin.png"></a>
							</dd>
						</dl>
					</div>
				</div>
			</div>
		</div>
		</div>
	<jsp:include page="/WEB-INF/views/layouts/foot.jsp"></jsp:include>
</body>
</html>